//
//  ViewController.m
//  hsy
//
//  Created by Les on 14-3-3.
//  Copyright (c) 2014年 Les. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

@synthesize mainWebView;
- (void)viewDidLoad
{
    [super viewDidLoad];
	
    mainViewController = self;
    self.mainWebView.delegate = self;
    
    
//    NSString* url =[[NSBundle mainBundle] pathForResource:@"index.html" ofType:@"" inDirectory:@"www"];
//    [(UIScrollView *)[[self.mainWebView subviews] objectAtIndex:0] setBounces:NO];
//    [self.mainWebView loadRequest: [NSURLRequest requestWithURL:[NSURL fileURLWithPath:url]]];
    
    
    NSString* login = @"<!DOCTYPE html><html xmlns:ng=\"http://angularjs.org\"><head><meta charset=\"utf-8\" /><title>登录</title><script>window.onload=function(){alert(1);};function demo(){alert(2);};</script></head><body ><div class=\"login_div\"><div style=\"height:60%;\" onclick=\"demo();\">123123</div><div class=\"login_btn\" ng-click=\"login();\"></div></div></body></html>";
    
    
    [self.mainWebView loadHTMLString:login baseURL:nil];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end
